
sampler2D input : register(s0);
/// <summary>Opacity rate</summary>
/// <minValue>0</minValue>
/// <maxValue>100</maxValue>
/// <defaultValue>1</defaultValue>
float rate:register(c0);
float4 main(float2 locationInSource : TEXCOORD) : COLOR
{ 
	float4 color; 
	color = tex2D( input , locationInSource.xy);
	if(rate<=0){
	 	color.a=0;
	 }
	 else{
	 	if(color.a>0){
	 		color.a=min(max(color.a*rate,0),1); // set the red portion to 100% 
	 	}
	 } 
    return color;
}